From: Chong Yidong Date: Mon, 6 Feb 2012 13:43:39 +0000 (+0800) Subject: * doc.c (store_function_docstring): Avoid applying docstring of alias to base function. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~905 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=c0a56bb42a93fc190af3d1fb8c97a125c018d9ee;p=emacs.git * doc.c (store_function_docstring): Avoid applying docstring of alias to base function. --- diff --git a/src/ChangeLog b/src/ChangeLog index 9717c6ce55c..207b9739996 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-02-06 Chong Yidong + + * doc.c (store_function_docstring): Avoid applying docstring of + alias to base function (Bug#2603). + 2012-02-04 Andreas Schwab * .gdbinit (pp1, pv1): Remove redundant defines. diff --git a/src/doc.c b/src/doc.c index 7bdb8c658b0..ad2c667e771 100644 --- a/src/doc.c +++ b/src/doc.c @@ -502,10 +502,12 @@ aren't strings. */) /* Scanning the DOC files and placing docstring offsets into functions. */ static void -store_function_docstring (Lisp_Object fun, EMACS_INT offset) +store_function_docstring (Lisp_Object sym, EMACS_INT offset) /* Use EMACS_INT because we get offset from pointer subtraction. */ { - fun = indirect_function (fun); + /* Don't use indirect_function here, or defaliases will apply their + docstrings to the base functions (Bug#2603). */ + Lisp_Object fun = XSYMBOL (sym)->function; /* The type determines where the docstring is stored. */